package com.foreknow.demo03;

public class HomeWork {
    public static void main(String[] args) {
        int [] a ={1,5,3,2,6,4,5,3};
        int num = 0;
        for(int k =1;k<a.length;k++){
            for(int l =0;l<a.length-1;l++){
                if(a[l]>a[l+1]){
                    num = a[l];
                    a[l]=a[l+1];
                    a[l+1]=num;
                }
            }
        }
        for(int i=0;i<a.length;i++){
            for(int j = 0;j<a.length-i-1;j++){
                if(a[j]==a[j+1]){
                    a[j]=0;
                }
            }
            System.out.println(a[i]);
        }

    }
}
